package com.springboot.demo.mapper;
import com.springboot.demo.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface MessageInfoMapper {

    //查找流言
    @Select("select * from message_info")
    List<MessageInfo> selectAll();

    //插入流言
    @Insert("insert into message_info (`from`, `to`, `message`) values (#{from},#{to},#{message})")
//    @Insert("insert into message_info (`from`, `to`, `message`) values (#{from},#{to},#{message})")
    Integer insertMessage(MessageInfo messageInfo);

}
